/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package MyBean;

import java.sql.*;

/**
 *
 * @author dav
 */


public class Connessione {
    private final String url = "jdbc:derby://localhost:1527/sample";
    private final String user = "app";
    private final String pass = "app";
    public String risultato = "";

    public Statement getConn() throws SQLException{
        DriverManager.registerDriver(new org.apache.derby.jdbc.EmbeddedDriver());    
        Connection c = DriverManager.getConnection(url,user,pass); 
        Statement st = c.createStatement();
        return st;
    }
    
    public Connessione(){
    }
    
    public String getRisultato(){
        return risultato;
    }

    public void setRisultato(String r){
        this.risultato=r;
    }
}

